diff --git a/landing/app-landing.react.js b/landing/app-landing.react.js
index 365635643..e1471a5ae 100644
--- a/landing/app-landing.react.js
+++ b/landing/app-landing.react.js
@@ -1,107 +1,86 @@
// @flow
import * as React from 'react';
-import { assetUrl, assetMetaData } from './asset-meta-data';
+import { assetMetaData } from './asset-meta-data';
import CyclingHeader from './cycling-header.react';
import InfoCard from './info-card.react';
import css from './landing.css';
import StarBackground from './star-background.react';
+import usePreloadAssets from './use-pre-load-assets.react';
function AppLanding(): React.Node {
+ usePreloadAssets(assetMetaData);
const [
hero,
federated,
customizable,
encrypted,
sovereign,
openSource,
lessNoisy,
] = assetMetaData;
- React.useEffect(() => {
- const testWEBP = 'UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA';
- const testImg = new Image();
-
- // preload webp if supported
- testImg.onload = () => {
- for (const imageFileName of assetMetaData) {
- const image = new Image();
- image.src = `${assetUrl}/${imageFileName.url}.webp`;
- }
- };
-
- // preload png if webp not supported
- testImg.onerror = () => {
- for (const imageFileName of assetMetaData) {
- const image = new Image();
- image.src = `${assetUrl}/${imageFileName.url}.png`;
- }
- };
-
- testImg.src = `data:image/webp;base64,${testWEBP}`;
- }, []);
-
return (
<>
(think "Web3 Discord")